<!DOCTYPE html>



  


<html class="theme-next pisces use-motion" lang="zh-Hans">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
<meta name="theme-color" content="#222">




<script>
    (function(){
        if(''){
            if (prompt('请输入文章密码') !== ''){
                alert('密码错误！');
                history.back();
            }
        }
    })();
  </script>






<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
















  
  
  <link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />







<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />

<link href="/css/main.css?v=5.1.4" rel="stylesheet" type="text/css" />



  <link rel="icon" type="image/png" sizes="32x32" href="/favicon.ico?v=5.1.4">







  <meta name="keywords" content="Swift," />





  <link rel="alternate" href="/atom.xml" title="Swift社区" type="application/atom+xml" />






<meta name="description" content="周报仓库：https://github.com/SwiftCommunityRes 前言Apple 举办了 Unleashed 活动发布了新品，借助超强的 M1 Pro 或 M1 Max 芯片，不管是基于新款的 MacBook Pro 开发应用，还是开发 MacBook Pro 下的应用，新机都将给我们带来突破性的性能和惊人的电池使用时长。 再加上强大的神经引擎，用于增强机器学习和升级的支持 P">
<meta name="keywords" content="Swift">
<meta property="og:type" content="article">
<meta property="og:title" content="Swift 周报 第五期">
<meta property="og:url" content="https://fanbaoying.github.io/Swift-周报-第五期/index.html">
<meta property="og:site_name" content="Swift社区">
<meta property="og:description" content="周报仓库：https://github.com/SwiftCommunityRes 前言Apple 举办了 Unleashed 活动发布了新品，借助超强的 M1 Pro 或 M1 Max 芯片，不管是基于新款的 MacBook Pro 开发应用，还是开发 MacBook Pro 下的应用，新机都将给我们带来突破性的性能和惊人的电池使用时长。 再加上强大的神经引擎，用于增强机器学习和升级的支持 P">
<meta property="og:locale" content="zh-Hans">
<meta property="og:image" content="https://user-images.githubusercontent.com/24238160/138631090-e34763aa-7ed8-4b9a-8e02-4fa56d55b045.png">
<meta property="og:image" content="https://user-images.githubusercontent.com/24238160/132703149-34121c6c-fd18-491c-a697-58a0fabf3060.png">
<meta property="og:image" content="https://files.mdnice.com/user/17787/9a7911bf-75f2-40f5-866b-3171868bb92c.jpg">
<meta property="og:updated_time" content="2021-10-25T06:51:47.000Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Swift 周报 第五期">
<meta name="twitter:description" content="周报仓库：https://github.com/SwiftCommunityRes 前言Apple 举办了 Unleashed 活动发布了新品，借助超强的 M1 Pro 或 M1 Max 芯片，不管是基于新款的 MacBook Pro 开发应用，还是开发 MacBook Pro 下的应用，新机都将给我们带来突破性的性能和惊人的电池使用时长。 再加上强大的神经引擎，用于增强机器学习和升级的支持 P">
<meta name="twitter:image" content="https://user-images.githubusercontent.com/24238160/138631090-e34763aa-7ed8-4b9a-8e02-4fa56d55b045.png">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Pisces',
    version: '5.1.4',
    sidebar: {"position":"left","display":"post","offset":12,"b2t":false,"scrollpercent":false,"onmobile":false},
    fancybox: true,
    tabs: true,
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    duoshuo: {
      userId: '0',
      author: '博主'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="https://fanbaoying.github.io/Swift-周报-第五期/"/>





  <title>Swift 周报 第五期 | Swift社区</title>
  








</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">

  
  
    
  

  <div class="container sidebar-position-left page-post-detail">
    <div class="headband"></div>
    
    <a href="https://github.com/SwiftCommunityRes" class="github-corner" aria-label="View source on GitHub"><svg width="80" height="80" viewBox="0 0 250 250" style="fill:#151513; color:#fff; position: absolute; top: 0; border: 0; right: 0;" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path></svg></a><style>.github-corner:hover .octo-arm{animation:octocat-wave 560ms ease-in-out}@keyframes octocat-wave{0%,100%{transform:rotate(0)}20%,60%{transform:rotate(-25deg)}40%,80%{transform:rotate(10deg)}}@media (max-width:500px){.github-corner:hover .octo-arm{animation:none}.github-corner .octo-arm{animation:octocat-wave 560ms ease-in-out}}</style>
    
    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/"  class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">Swift社区</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <p class="site-subtitle">做最好的 Swift 社区</p>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-categories">
          <a href="/categories/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-th"></i> <br />
            
            分类
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/tags/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-tags"></i> <br />
            
            标签
          </a>
        </li>
      
        
        <li class="menu-item menu-item-about">
          <a href="/about/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-user"></i> <br />
            
            关于
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/archives/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />
            
            归档
          </a>
        </li>
      

      
    </ul>
  

  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="https://fanbaoying.github.io/Swift-周报-第五期/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="Swift社区">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="https://avatars.githubusercontent.com/u/84354365?v=4">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="Swift社区">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">Swift 周报 第五期</h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2021-10-25T11:27:35+08:00">
                2021-10-25
              </time>
            

            

            
          </span>

          
            <span class="post-category" >
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/Swift-周报/" itemprop="url" rel="index">
                    <span itemprop="name">Swift 周报</span>
                  </a>
                </span>

                
                
              
            </span>
          

          
            
          

          
          

          

          
            <div class="post-wordcount">
              
                
                <span class="post-meta-item-icon">
                  <i class="fa fa-file-word-o"></i>
                </span>

                <!-- 
                  <span class="post-meta-item-text">字数统计&#58;</span>
                
                -->
                <span title="字数统计">
                  数字统计 1,872字
                </span>
              

              
                <span class="post-meta-divider">|</span>
              

              
                <span class="post-meta-item-icon">
                  <i class="fa fa-clock-o"></i>
                </span>

                <!-- 
                  <span class="post-meta-item-text">阅读时长 &asymp;</span>
                
                --> 

                <span title="阅读时长">
                  阅读时长 7分钟
                </span>
              
            </div>
          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        <p><img src="https://user-images.githubusercontent.com/24238160/138631090-e34763aa-7ed8-4b9a-8e02-4fa56d55b045.png" alt=""></p>
<p>周报仓库：<a href="https://github.com/SwiftCommunityRes" target="_blank" rel="noopener">https://github.com/SwiftCommunityRes</a></p>
<h2 id="前言"><a href="#前言" class="headerlink" title="前言"></a>前言</h2><p>Apple 举办了 <code>Unleashed</code> 活动发布了新品，借助超强的 <code>M1 Pro</code> 或 <code>M1 Max</code> 芯片，不管是基于新款的 <code>MacBook Pro</code> 开发应用，还是开发 <code>MacBook Pro</code> 下的应用，新机都将给我们带来突破性的性能和惊人的电池使用时长。</p>
<p>再加上强大的神经引擎，用于增强机器学习和升级的支持 <code>ProRes</code> 的媒体引擎，新款 <code>MacBook Pro</code> 能让我们的 App 做前所未有的事情。</p>
<blockquote>
<p>为了 Swift 社区周报持续稳定的发布更新，我们希望邀请 Swift 爱好者参与<strong>周报编辑</strong>，同时邀请赞助商对我们平台赞助支持。</p>
</blockquote>
<a id="more"></a>
<h2 id="入门任务"><a href="#入门任务" class="headerlink" title="入门任务"></a>入门任务</h2><p><strong>SR-15312</strong> [Swift-DocC] <a href="https://bugs.swift.org/browse/SR-15312" title="Add &#39;version&#39; command to docc command line tool" target="_blank" rel="noopener">添加 “version” 命令到 docc 命令行工具中</a> </p>
<p><strong>SR-15312</strong> [Swift-DocC] <a href="https://bugs.swift.org/browse/SR-15313" title="Primary tutorial navigation dropdown fails to bold the current tutorial when browser URL is not lowercased" target="_blank" rel="noopener">当浏览器 URL 不是小写时，主教程导航下拉菜单无法将当前教程字体加粗</a> </p>
<h2 id="新闻和社区"><a href="#新闻和社区" class="headerlink" title="新闻和社区"></a>新闻和社区</h2><p><strong>Franklin Schrans</strong> 宣布 <a href="https://swift.org/blog/swift-docc/" title="Swift-DocC is Now Open Source" target="_blank" rel="noopener">Swift-DocC</a> 将要开源.</p>
<p><strong>Marin Todorov</strong> 终于披露了他关于 <a href="https://github.com/apple/swift-markdown" title="Swift Markdown" target="_blank" rel="noopener"><code>Swift Markdown</code></a> 的工作.</p>
<p><strong>Federico Zanetello</strong> 写了一篇<a href="https://www.fivestars.blog/articles/warn_unqualified_access/" title="warn_unqualified_access" target="_blank" rel="noopener">文章</a>来说明 <code>@warn_unqualified_access</code> 的使用.</p>
<p><strong>Dave DeLong</strong> 解释了如何<a href="https://davedelong.com/blog/2021/10/09/simplifying-backwards-compatibility-in-swift/" title="Simplifying Backwards Compatibility in Swift" target="_blank" rel="noopener">简化 Swift 中的向后兼容性</a>。</p>
<p><code>Swift-DocC</code> 的文档现在已经发布在 <a href="https://swift.org/documentation/docc/" title="Docc" target="_blank" rel="noopener">Swift.org</a> (使用 <a href="https://forums.swift.org/t/documentation-for-swift-docc-is-now-on-swift-org/52914" title="Documentation for Swift-DocC is now on Swift.org" target="_blank" rel="noopener">Swift-DocC!</a>).</p>
<h2 id="正在审查的提案"><a href="#正在审查的提案" class="headerlink" title="正在审查的提案"></a>正在审查的提案</h2><p><strong>SE-0325</strong> <a href="https://github.com/apple/swift-evolution/blob/main/proposals/0325-swiftpm-additional-plugin-apis.md" title="Additional Package Plugin APIs" target="_blank" rel="noopener">附加包插件 API</a> 正在审查中。</p>
<p><strong>SE-0303</strong> 在 <code>SwiftPM</code> 中引入了定义构建工具插件的能力, 允许自定义工具在构建打包时被调用。为了支持该特性， <strong>SE-0303</strong> 引入了最小初始 API，插件能够通过该接口获取那些被唤起构建的 Target 的相关信息。</p>
<p>该提案扩展了插件 API 以提供更多上下文，包括更丰富的包图表示。 这是为将来支持新类型的插件做准备。</p>
<h2 id="Swift-论坛"><a href="#Swift-论坛" class="headerlink" title="Swift 论坛"></a>Swift 论坛</h2><p><strong>1. Nuri Amari</strong> 提出了<a href="https://forums.swift.org/t/pitch-improved-clangimporter-diagnostics/52687" title="Improved ClangImporter Diagnostics" target="_blank" rel="noopener">改进 ClangImporter</a> 的建议。</p>
<p>提出对 <code>ClangImporter</code> 的改进建议，当导入 <code>C</code> 或 <code>Objective-C</code> 实体发生错误时提供更详细的反馈。 就目前而言，当 <code>ClangImporter</code> 无法完全或部分导入实体（函数、类型、宏等）时，出现错误是不会提示的。当前的 Swift 编译错误大部分情况下会提示<strong>从未定义过实体</strong>。</p>
<p><strong>2. Frederick Kellison-Linn</strong> 提出了<a href="https://forums.swift.org/t/pitch-generalize-keypath-to-function-conversions/52681" title="Generalize keypath-to-function conversions" target="_blank" rel="noopener">关键路径到函数转换</a>的想法。</p>
<p>该提案介绍了在允许 <code>(Root) -&gt; Value</code> 函数的情况下使用键路径表达式 <code>\Root.value</code> 的能力。</p>
<p><code>Swift-evolution</code> 线程：<a href="https://forums.swift.org/t/key-path-expressions-as-functions/19587" title="Key Path Expressions as Functions" target="_blank" rel="noopener">关键路径表达式作为函数</a></p>
<p><strong>3. Patrick Pijnappel</strong> 提出了为 <a href="https://forums.swift.org/t/pitch-exhaustive-pattern-matching-for-non-open-classes/52718" title="Exhaustive pattern matching for non-open classes" target="_blank" rel="noopener">non-open 类实现详尽模式匹配</a>的建议。</p>
<p>由于现在区分了开放类和非开放类，非开放类层次结构应该能够完全匹配。对于添加新子类，不需要添加任何语法就可以完成。</p>
<p><strong>4. Guillaume Lessard</strong> 提出了对<a href="https://forums.swift.org/t/pitch-pointer-usability-improvements/52736" title="Pointer Usability Improvements" target="_blank" rel="noopener">指针可用性</a>的改进。</p>
<p>该提案为 <code>UnsafePointer</code>、<code>Mutable</code> 和 <code>Raw</code> 引入了一些 quality-of-life 改进。</p>
<ol>
<li>添加 API 获取一个 <code>UnsafeRawPointer</code> 实例，这是一个从起点推进到给定对齐的实例</li>
<li>在给定 <code>UnsafePointer&lt;T&gt;</code> 的情况下，添加一个 API 获取指向聚合的存储属性的指针 T</li>
<li>将<code>Unsafe[Mutable]Pointer</code> 未选中的下标重命名为包含 <code>unchecked</code> 标签</li>
<li>添加比较任意两种类型的指针的能力</li>
</ol>
<p><strong>5. Pavel Yaskevich</strong> 提出了改进<a href="https://forums.swift.org/t/pitch-light-weight-same-type-constraint-syntax/52889" title="Light-weight same-type constraint syntax" target="_blank" rel="noopener">相同类型约束语法</a>的建议。</p>
<p>为了实现改进泛型 UI 的目标，我们提出几项改进措施，为了解决协议和泛型类型之间的语法差距，在<strong>关联类型</strong>和<strong>泛型类型</strong>参数相同类型的约束上，隐藏了一些复杂性（视觉上和认知上）。</p>
<p><strong>6. Holly Borla</strong> 开始讨论如何<a href="https://forums.swift.org/t/discussion-easing-the-learning-curve-for-introducing-generic-parameters/52891" title="Easing the learning curve for introducing generic parameters" target="_blank" rel="noopener">简化引入泛型参数的学习曲线</a>。</p>
<p>Swift 的泛型系统具有很强的表达能力，但是要理解具有相关类型的协议、带有 where 子句的泛型签名以及其他泛型特性的完整通用性，是将泛型引入 Swift 项目的一个重大障碍。泛型系统的主要目标是通过改进在 Swift 中编写泛型代码的人体工程学，将具体API抽象为泛型API的学习曲线。本次讨论目的是就实现这一目标的可能方向征求意见，并收集在社区中提出的其他想法。欢迎在文末留言提出问题、评论和想法！</p>
<p>本帖中的许多想法都是由 <strong>@Joe_Groff</strong> 在<a href="https://forums.swift.org/t/improving-the-ui-of-generics/22814" title="Improving the UI of generics" target="_blank" rel="noopener">改进泛型 UI</a> 中提出的。</p>
<p><strong>7. Nate Cook</strong> 提出了一个<a href="https://forums.swift.org/t/pitch-character-classes-for-string-processing/52920" title="Character Classes for String Processing" target="_blank" rel="noopener">用于字符串处理的字符类</a>的想法。</p>
<p><a href="https://forums.swift.org/t/declarative-string-processing-overview/52459" title="Declarative String Processing Overview" target="_blank" rel="noopener">声明性字符串处理概述</a>讲述了正则表达式支持的匹配，但没有关于语法和语义的详细信息，将澄清留给后续介绍。</p>
<p><a href="https://forums.swift.org/t/pitch-regular-expression-literals/52820" title="Regular Expression Literals" target="_blank" rel="noopener">正则表达式的文本</a>提供了关于正则表达式语法的更多细节，例如分隔符和 <code>PCRE-syntax</code> 内部结构，省略了对正则表达式语义的讨论。本帖的目的旨在解决正则表达式语义的目标子集：<strong>字符类的定义</strong>。我们建议直接在现有的 <code>Character</code> 和 <code>Unicode.Scalar</code> 上和新提出的 API 背景下来处理。</p>
<p>正则表达式中的字符类包括元字符，例如匹配数字的 <code>\d</code>、匹配空格的 <code>\s</code> 和 匹配任何字符的 <code>.</code>。单个文字字符也可以被认为是字符类，因为它们至少与自己匹配，并且在不区分大小写的匹配中，与大小写切换的对应字符匹配。因此，将字符类视为正则表达式字面量的任何部分，该部分可以匹配字符串的实际组件。</p>
<h2 id="推荐博文"><a href="#推荐博文" class="headerlink" title="推荐博文"></a>推荐博文</h2><p><a href="https://mp.weixin.qq.com/s/vjC45D5249397bfUCXfhLg" target="_blank" rel="noopener">Swift 5 从零到精通 iOS 开发训练营</a></p>
<p>《Swift 5 从零到精通 iOS 开发训练营》是一本从基础到 iOS 项目开发的实战教程，由资深 iOS 开发程序员珲少亲自操刀编撰而成。<code>文末有送书抽奖，抽奖为 Swift社区 额外福利</code></p>
<p><a href="**https://mp.weixin.qq.com/s/qM4O-wBCZgvn0oFCR7kIbA**">iOS UI 自动化测试原理以及在 Trip.com 的应用实践</a></p>
<p>来自携程 IBU 公共无线倪瑶的实战分享： iOS UI 自动化测试实战以及原理总结。</p>
<p><a href="https://mp.weixin.qq.com/s/7-QlpcfhTaw4D_SmQYbmfA" target="_blank" rel="noopener">一文带你读懂 Swift 社区最新开源的算法库</a></p>
<p>最近 Swift 社区动作频频，又是登陆 Windows，又是推出底层基础库。现在又推出了 Swift 算法库，现在让我们看看里面到底有什么内容，是否值得现在在生产中应用，面对内容丰富的 <code>raywenderlich/swift-algorithm-club</code> 是否有足够的竞争力呢。</p>
<p><a href="https://mp.weixin.qq.com/s/aoQuDd58LQRSbJty5Tyjfw" target="_blank" rel="noopener">多角度体会 Swift 方法派发</a></p>
<p>我们知道 Swift 有三种方法派发方式：静态派发（直接派发）、VTable 派发（函数表派发）、消息派发。下面我们分别从 SIL 中间语言，以及汇编的角度体会 Swift 的方法派发方式。</p>
<h2 id="关于我们"><a href="#关于我们" class="headerlink" title="关于我们"></a>关于我们</h2><p>公众号是由 Swift 爱好者共同维护，我们会分享以 Swift 实战、SwiftUI、Swift 基础为核心的技术内容，也整理收集优秀的学习资料。欢迎关注公众号：<strong>Swift社区</strong>，后台点击进群，联系我们获取更多内容。</p>
<p><img width="500" alt="Swift社区" src="https://user-images.githubusercontent.com/24238160/132703149-34121c6c-fd18-491c-a697-58a0fabf3060.png"></p>
<p>感谢 SwiftWeekly 与我们的合作，开启 Swift 周报中文版发布之旅。周报仓库：<a href="https://github.com/SwiftCommunityRes" target="_blank" rel="noopener">https://github.com/SwiftCommunityRes</a></p>
<p>后续还会翻译大量资料到我们公众号，有感兴趣的朋友，可以加入我们，扫码添加微信</p>
<div align="center"><br><img width="300" alt="fzhanfei" src="https://files.mdnice.com/user/17787/9a7911bf-75f2-40f5-866b-3171868bb92c.jpg"><br></div>


      
    </div>
    
    
    
    

    
      <div>
        <div>
    
        <div style="text-align:center;color: #ccc;font-size:14px;">-------------本文结束<i class="fa fa-paw"></i>感谢您的阅读-------------</div>
    
</div>

      </div>
    


    
      <div>
        
<div class="my_post_copyright">
  <script src="//cdn.bootcss.com/clipboard.js/1.5.10/clipboard.min.js"></script>

  <!-- JS库 sweetalert 可修改路径 -->
  <script src="https://cdn.bootcss.com/jquery/2.0.0/jquery.min.js"></script>
  <script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
  <p><span>本文标题:</span><a href="/Swift-周报-第五期/">Swift 周报 第五期</a></p>
  <p><span>文章作者:</span><a href="/" title="访问 Swift社区 的个人博客">Swift社区</a></p>
  <p><span>发布时间:</span>2021年10月25日 - 11:10</p>
  <p><span>最后更新:</span>2021年10月25日 - 14:10</p>
  <p><span>原始链接:</span><a href="/Swift-周报-第五期/" title="Swift 周报 第五期">https://fanbaoying.github.io/Swift-周报-第五期/</a>
    <span class="copy-path"  title="点击复制文章链接"><i class="fa fa-clipboard" data-clipboard-text="https://fanbaoying.github.io/Swift-周报-第五期/"  aria-label="复制成功！"></i></span>
  </p>
  <p><span>许可协议:</span><i class="fa fa-creative-commons"></i> <a rel="license" href="https://creativecommons.org/licenses/by-nc-nd/4.0/" target="_blank" title="Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0)">署名-非商业性使用-禁止演绎 4.0 国际</a> 转载请保留原文链接及作者。</p>  
</div>
<script> 
    var clipboard = new Clipboard('.fa-clipboard');
      $(".fa-clipboard").click(function(){
      clipboard.on('success', function(){
        swal({   
          title: "",   
          text: '复制成功',
          icon: "success", 
          showConfirmButton: true
          });
        });
    });  
</script>

      </div>
    


    

    
      <div>
        <div style="padding: 10px 0; margin: 20px auto; width: 90%; text-align: center;">
  <div>坚持原创技术分享，您的支持将鼓励我继续创作！</div>
  <button id="rewardButton" disable="enable" onclick="var qr = document.getElementById('QR'); if (qr.style.display === 'none') {qr.style.display='block';} else {qr.style.display='none'}">
    <span>打赏</span>
  </button>
  <div id="QR" style="display: none;">

    
      <div id="wechat" style="display: inline-block">
        <img id="wechat_qr" src="/images/wechat.png" alt="Swift社区 微信支付"/>
        <p>微信支付</p>
      </div>
    

    
      <div id="alipay" style="display: inline-block">
        <img id="alipay_qr" src="/images/alipay.png" alt="Swift社区 支付宝"/>
        <p>支付宝</p>
      </div>
    

    

  </div>
</div>

      </div>
    

    

    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/tags/Swift/" rel="tag"><i class="fa fa-tag"></i> Swift</a>
          
        </div>
      

      
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/Swift-周报-第六期/" rel="next" title="Swift 周报 第六期">
                <i class="fa fa-chevron-left"></i> Swift 周报 第六期
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/LeetCode - 1 Two Sum/" rel="prev" title="LeetCode - 1 Two Sum">
                LeetCode - 1 Two Sum <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </div>
  
  
  
  </article>



    <div class="post-spread">
      
        <!-- JiaThis Button BEGIN -->
<div class="jiathis_style">
<span class="jiathis_txt">分享到：</span>
<a class="jiathis_button_fav">收藏夹</a>
<a class="jiathis_button_copy">复制网址</a>
<a class="jiathis_button_email">邮件</a>
<a class="jiathis_button_weixin">微信</a>
<a class="jiathis_button_qzone">QQ空间</a>
<a class="jiathis_button_tqq">腾讯微博</a>
<a class="jiathis_button_douban">豆瓣</a>
<a class="jiathis_button_share">一键分享</a>

<a href="http://www.jiathis.com/share?uid=2140465" class="jiathis jiathis_txt jiathis_separator jtico jtico_jiathis" target="_blank">更多</a>
<a class="jiathis_counter_style"></a>
</div>
<script type="text/javascript" >
var jiathis_config={
  data_track_clickback:true,
  summary:"",
  shortUrl:false,
  hideMore:false
}
</script>
<script type="text/javascript" src="http://v3.jiathis.com/code/jia.js?uid=" charset="utf-8"></script>
<!-- JiaThis Button END -->
      
    </div>
  </div>


          </div>
          


          

  



        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap">
            文章目录
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview-wrap">
            站点概览
          </li>
        </ul>
      

      <section class="site-overview-wrap sidebar-panel">
        <div class="site-overview">
          <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
            
              <img class="site-author-image" itemprop="image"
                src="https://avatars.githubusercontent.com/u/84354365?v=4"
                alt="Swift社区" />
            
              <p class="site-author-name" itemprop="name">Swift社区</p>
              <p class="site-description motion-element" itemprop="description">我们的使命是做一个最专业最权威的 Swift 中文社区，我们的愿景是希望更多的人学习和使用Swift。我们会分享以 Swift 实战、SwiftUI、Swift 基础为核心的技术干货，不忘初心，牢记使命。</p>
          </div>

          <nav class="site-state motion-element">

            
              <div class="site-state-item site-state-posts">
              
                <a href="/archives/">
              
                  <span class="site-state-item-count">187</span>
                  <span class="site-state-item-name">日志</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-categories">
                <a href="/categories/index.html">
                  <span class="site-state-item-count">19</span>
                  <span class="site-state-item-name">分类</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-tags">
                <a href="/tags/index.html">
                  <span class="site-state-item-count">11</span>
                  <span class="site-state-item-name">标签</span>
                </a>
              </div>
            

          </nav>

          
            <div class="feed-link motion-element">
              <a href="/atom.xml" rel="alternate">
                <i class="fa fa-rss"></i>
                RSS
              </a>
            </div>
          

          
            <div class="links-of-author motion-element">
                
                  <span class="links-of-author-item">
                    <a href="https://blog.csdn.net/qq_36478920" target="_blank" title="CSDN">
                      
                        <i class="fa fa-fw fa-heartbeat"></i>CSDN</a>
                  </span>
                
                  <span class="links-of-author-item">
                    <a href="https://juejin.im/user/5a30d987f265da430d580126" target="_blank" title="掘金">
                      
                        <i class="fa fa-fw fa-spinner"></i>掘金</a>
                  </span>
                
                  <span class="links-of-author-item">
                    <a href="https://github.com/fanbaoying" target="_blank" title="GitHub">
                      
                        <i class="fa fa-fw fa-github"></i>GitHub</a>
                  </span>
                
                  <span class="links-of-author-item">
                    <a href="https://www.zhihu.com/people/swift-community" target="_blank" title="知乎">
                      
                        <i class="fa fa-fw fa-heartbeat"></i>知乎</a>
                  </span>
                
                  <span class="links-of-author-item">
                    <a href="https://weibo.com/u/7711465033" target="_blank" title="微博">
                      
                        <i class="fa fa-fw fa-weibo"></i>微博</a>
                  </span>
                
                  <span class="links-of-author-item">
                    <a href="https://mp.weixin.qq.com/mp/appmsgalbum?__biz=MzAxNzgzNTgwMw==&action=getalbum&album_id=2024314764775981057" target="_blank" title="公众号">
                      
                        <i class="fa fa-fw fa-heartbeat"></i>公众号</a>
                  </span>
                
            </div>
          

          
          

          
          
            <div class="links-of-blogroll motion-element links-of-blogroll-block">
              <div class="links-of-blogroll-title">
                <i class="fa  fa-fw fa-link"></i>
                友情链接
              </div>
              <ul class="links-of-blogroll-list">
                
                  <li class="links-of-blogroll-item">
                    <a href="https://github.com/SwiftCommunityRes/SwiftWeekly" title="SwiftWeekly" target="_blank">SwiftWeekly</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="https://github.com/SwiftCommunityRes/article-ios" title="Article-ios" target="_blank">Article-ios</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="https://github.com/SwiftCommunityRes/SwiftUI-Book" title="SwiftUI-Book" target="_blank">SwiftUI-Book</a>
                  </li>
                
              </ul>
            </div>
          

          

        </div>
      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#前言"><span class="nav-number">1.</span> <span class="nav-text">前言</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#入门任务"><span class="nav-number">2.</span> <span class="nav-text">入门任务</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#新闻和社区"><span class="nav-number">3.</span> <span class="nav-text">新闻和社区</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#正在审查的提案"><span class="nav-number">4.</span> <span class="nav-text">正在审查的提案</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#Swift-论坛"><span class="nav-number">5.</span> <span class="nav-text">Swift 论坛</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#推荐博文"><span class="nav-number">6.</span> <span class="nav-text">推荐博文</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#关于我们"><span class="nav-number">7.</span> <span class="nav-text">关于我们</span></a></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        
<script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
<div class="copyright">&copy; <span itemprop="copyrightYear">2024</span>
  <span class="with-love">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">Swift社区</span>

  
</div>

<!-- 
<div class="powered-by">
  <i class="fa fa-user-md">
  </i>
  <span id="busuanzi_container_site_uv">
    已有<span id="busuanzi_value_site_uv"></span>人来访
  </span>

</div>


  <span class="post-meta-divider">|</span>


<div class="powered-by">
  <i class="fa fa-eye"></i>
  <span id="busuanzi_container_site_pv">
      访问量<span id="busuanzi_value_site_pv"></span>次
  </span>
</div>



  <span class="post-meta-divider">|</span>


-->

<div class="theme-info">
  <i class="fa fa-pencil"></i>
  <span class="post-count">博客全站共361.6k字</span>
</div>


<!-- 
  <span class="post-meta-divider">|</span>



  <div class="powered-by">由 <a class="theme-link" target="_blank" href="https://hexo.io">Hexo</a> 强力驱动</div>



  <span class="post-meta-divider">|</span>



  <div class="theme-info">主题 &mdash; <a class="theme-link" target="_blank" href="https://github.com/iissnan/hexo-theme-next">NexT.Pisces</a> v5.1.4</div>



-->

        







        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    

    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  












  
  
    <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>
  

  
  
    <script type="text/javascript" src="/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>
  

  
  
    <script type="text/javascript" src="/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>
  


  


  <script type="text/javascript" src="/js/src/utils.js?v=5.1.4"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=5.1.4"></script>



  
  


  <script type="text/javascript" src="/js/src/affix.js?v=5.1.4"></script>

  <script type="text/javascript" src="/js/src/schemes/pisces.js?v=5.1.4"></script>



  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=5.1.4"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=5.1.4"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=5.1.4"></script>



  


  




	





  





  












  





  

  

  

  
  

  

  

  

</body>
</html>
